#ifndef GAMELOGIC_H
#define GAMELOGIC_H

#include <QObject>
#include "stdshared.h"
#include "qipan.h"
class GameLogic : public QObject
{
    Q_OBJECT
public:
    explicit GameLogic(QObject *parent = nullptr);
    /*判断角色是否获胜*/
    bool checkWin(int row,int col,Role role);
    /*设置棋盘信息*/
    void setQipanBoard(Role ** board,int boardSize);
    /*人机移动*/
    void computerMove();
private:
    /*评估该点对玩家的值*/
    int evaluateMove(int row,int col,Role role);
signals:
    void Aiposition(int row,int col);
public slots:
private:
    /*玩家是1，人机是2*/
    Role ** m_board;
    int m_boardSize;
};

#endif // GAMELOGIC_H
